]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
SystemMenu: wait for a completed paint before switching VT
authorGiovanni Campagna <gcampagn@redhat.com>
Wed, 25 Sep 2013 12:02:56 +0000 (14:02 +0200)
committerGiovanni Campagna <gcampagn@redhat.com>
Thu, 26 Sep 2013 08:46:42 +0000 (10:46 +0200)
Activating the GDM login screen switches VT and causes X to freeze
event processing (because it lost the drm master), so must make
sure to have painted the lock screen at least once before proceeding,
or the user can go back and see the unlocked desktop.

https://bugzilla.gnome.org/show_bug.cgi?id=708051

js/ui/status/system.js

index c319b09501c63077086e36cc8259a81b6e158551..b320c7763de730a5d074c5503c05d13e19303811 100644 (file)
@@ -372,7 +372,11 @@ const Indicator = new Lang.Class({
         Main.overview.hide();
         if (Main.screenShield)
             Main.screenShield.lock(false);
-        Gdm.goto_login_session_sync(null);
+
+        Clutter.threads_add_repaint_func_full(Clutter.RepaintFlags.POST_PAINT, function() {
+            Gdm.goto_login_session_sync(null);
+            return false;
+        });
     },
 
     _onQuitSessionActivate: function() {